# #for
# #for 变量 in 集合：
# #循环语句
#
# # 字符串
# s1  = 'abcdefg'
# for a in s1:
#     print(a,end=' ')
#
# print('=============================')
# # 元组
# t1 = (1,2,3,4,5,'sdaf','sadf')
# for a in t1:
#     print(a,end=' ')
# print('=============================')
# # 列表
# l1 = [2,3,1,4,5,7]
# for a in l1:
#     print(a,end=' ')
# print('=============================')
#
# # 有序集合
# # for 变量 in range(开始，结束，步长)
# # 循环语句
#
# # for语句1-10
# for a in range(1,11,1):
#     print(a)
#
# # 7.用for语句1加到100，求和
# sum = 0
# for a in range(1,101):
#     sum += a
# print(sum)
#
# # 7.用for语句1加到100，求和
# sum = 0
# for a in range(1,101):
#     if a % 2 ==0:
#         sum += a
# print(sum)
#
# # 循环嵌套
# # 打印5*6的阵列，用*号表示
# for a in range(1,6):
#
#     for b in range(1,7):
#         print("*",end=" ")
#     print()
#
# for a in range(1,6):
#     print("* * * * * * \n",end = '')

for a in range(1,10):
    for b in range(1,10):
        print(a*b,end="\t")
    print()


for a in range(1,10):

    for b in range(1,a+1):

        # 正确的格式字符串和 end 参数
        print(f"{b} * {a} = {a * b}", end="\t")

    print()
